
#演示单继承
class phone:
    IMEI=None
    produce="HM"

    def call_by_4g(self):
        print("4g通话")

class phone2022(phone):
    face_id="10001"
    
    def call_by_5g(self):
        print("5g通话")

ph=phone2022()
ph.call_by_4g()
ph.call_by_5g()
print(ph.IMEI)
print(ph.produce)
print(ph.face_id)

#演示多继承
class NFCReader:
    nfc_type="第五代"
    produce="HM"

    def read_card(self):
        print("NFC读卡")

class remote_control():
    rc_type="红外遥控"

    def control(self):
        print("红外遥控器开启")

class myphone(NFCReader,remote_control):#对于同名的属性，谁先来的谁的优先级高
    pass

myph=myphone()


